package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.PlfAuthService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBasePlfAuthClient;
import com.wicket.okrframework.integration.dto.ArchivePlfPowerAuthRespDto;
import com.wicket.okrframework.integration.dto.ArchivePlfPowerAuthReqDto;
import com.wicket.okrframework.integration.dto.QueryPlfPowerAuthDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryPlfPowerAuthDetailReqDto;
import com.wicket.okrframework.integration.FwBasePowerClient;
import com.wicket.okrframework.integration.dto.ArchiveTributPowerRedisRespDto;
import com.wicket.okrframework.integration.dto.ArchiveTributPowerRedisReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.QueryPltRoleAuthListRespDto;
import com.wicket.okrframework.integration.dto.QueryPltRoleAuthListReqDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrframework.integration.FwBaseRoleClient;
import com.wicket.okrframework.integration.dto.QueryRoleMenuListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleMenuListReqDto;
import com.wicket.okrframework.integration.dto.QueryPlfPowerAuthListRespDto;
import com.wicket.okrframework.integration.dto.QueryPlfPowerAuthListReqDto;
import com.wicket.okrframework.integration.dto.QueryPltAuthPowerListRespDto;
import com.wicket.okrframework.integration.dto.QueryPltAuthPowerListReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffFrameworkPrivacyDto;
import com.wicket.okrframework.integration.dto.QueryPltAuthRoleListRespDto;
import com.wicket.okrframework.integration.dto.QueryPltAuthRoleListReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "PlfAuth", tags = {"PlfAuth"})
@RestController
// @RequestMapping("/oms/plfAuth/")
public class PlfAuthController {

    @Autowired
    PlfAuthService plfAuthService;

    /**
   * B1-2查询授权角色导航列表（管理）
   * gen by moon at 8/10/2022, 3:34:47 AM
   */
    @PostMapping("/oms/mgt/plfAuth/queryPltRoleAuthMenuListBorder")
    @ApiOperation(value = "B1-2查询授权角色导航列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryPltRoleAuthMenuListBorderRespDto> queryPltRoleAuthMenuListBorder(@RequestBody(required=false) @Validated BffQueryPltRoleAuthMenuListBorderReqDto reqDTO){
        return OkrResult.success(plfAuthService.queryPltRoleAuthMenuListBorder(reqDTO));
    }



    /**
   * B1-1查询权限授权列表（管理）
   * gen by moon at 8/17/2022, 7:39:28 PM
   */
    @PostMapping("/oms/mgt/plfAuth/queryPlfPowerAuthList")
    @ApiOperation(value = "B1-1查询权限授权列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryPlfPowerAuthListRespDto> queryPlfPowerAuthList(@RequestBody(required=false) @Validated BffQueryPlfPowerAuthListReqDto reqDTO){
        return OkrResult.success(plfAuthService.queryPlfPowerAuthList(reqDTO));
    }





    /**
   * B1-1查询角色授权列表（管理）
   * gen by moon at 8/10/2022, 3:32:21 AM
   */
    @PostMapping("/oms/mgt/plfAuth/queryPltRoleAuthList")
    @ApiOperation(value = "B1-1查询角色授权列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryPltRoleAuthListRespDto> queryPltRoleAuthList(@RequestBody(required=false) @Validated BffQueryPltRoleAuthListReqDto reqDTO){
        return OkrResult.success(plfAuthService.queryPltRoleAuthList(reqDTO));
    }




    /**
   * B1-1查询授权角色列表（边界）
   * gen by moon at 8/10/2022, 3:36:14 AM
   */
    @PostMapping("/oms/plfAuth/queryPltAuthRoleListBorder")
    @ApiOperation(value = "B1-1查询授权角色列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryPltAuthRoleListBorderRespDto> queryPltAuthRoleListBorder(@RequestBody(required=false) @Validated BffQueryPltAuthRoleListBorderReqDto reqDTO){
        return OkrResult.success(plfAuthService.queryPltAuthRoleListBorder(reqDTO));
    }

    /**
   * B1-2查询授权权限列表（边界）
   * gen by moon at 8/18/2022, 10:49:44 PM
   */
    @PostMapping("/oms/mgt/plfAuth/queryPltAuthPowerListBorder")
    @ApiOperation(value = "B1-2查询授权权限列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryPltAuthPowerListBorderRespDto> queryPltAuthPowerListBorder(@RequestBody(required=false) @Validated BffQueryPltAuthPowerListBorderReqDto reqDTO){
        return OkrResult.success(plfAuthService.queryPltAuthPowerListBorder(reqDTO));
    }
/**
   * B1-1存档平台权限授权（平台）
   * gen by moon at 8/10/2022, 3:29:31 AM
   */
    @PostMapping("/oms/plfAuth/archivePlfPowerAuth")
    @ApiOperation(value = "B1-1存档平台权限授权（平台）", response = OkrResult.class)
    public OkrResult<BffArchivePlfPowerAuthRespDto> archivePlfPowerAuth(@RequestBody(required=false) @Validated BffArchivePlfPowerAuthReqDto reqDTO){
        return OkrResult.success(plfAuthService.archivePlfPowerAuth(reqDTO));
    }



}
